package com.gdssoft.pdaweb.dao.am.impl;

/*
 *  捷达世软件(深圳)有限公司
 *  Copyright (C) 2008-2010 ShenZhen JieDaShi Software Limited Company.
 */

import java.util.List;

import com.gdssoft.core.dao.impl.BaseDaoImpl;
import com.gdssoft.pdaweb.dao.am.AmMonthPlanDao;
import com.gdssoft.pdaweb.model.am.AmMonthPlan;
import com.gdssoft.pdaweb.model.water.WaterMeterMonthPlan;

@SuppressWarnings("unchecked")
public class AmMonthPlanDaoImpl extends BaseDaoImpl<AmMonthPlan> 
implements AmMonthPlanDao {

	public AmMonthPlanDaoImpl() {
		super(AmMonthPlan.class);
	}

	@Override
	public List<AmMonthPlan> listByIdStatus(Long planID,Long plan_status) {
		String hsql="from AmMonthPlan where planId=? and planStatus=?";
		return this.findByHql(hsql, new Object[]{planID,plan_status});
	}

	@Override
	public List<AmMonthPlan> listByIdMonth(Long planID, String numMonth) {
		String hsql="from AmMonthPlan where planId=? and month=?";
		return this.findByHql(hsql, new Object[]{planID,numMonth});
	}

	@Override
	public List<AmMonthPlan> listByMpId(Long mpId) {
		String hsql="from AmMonthPlan where mpId=?";
		return this.findByHql(hsql, new Object[]{mpId});
	}
	@Override
	public List<AmMonthPlan> getByStatus(Long status) {
		String hql="from AmMonthPlan where planStatus=?";
		return this.findByHql(hql, new Object[]{status});
	}
}
